package com.ymatou.iapi.sellerproduct.service;

import java.util.HashMap;
import java.util.Map;

import org.json.JSONObject;

import com.ymttest.business.YmatouAutoTestCall;
import com.ymttest.utils.EnvSetup;
import com.ymttest.utils.compare.CallAPI;

public class GetProductAndCatalogInfoCall  extends YmatouAutoTestCall implements CallAPI{

	private static String opurl ="/api/SellerProduct/GetProductAndCatalogInfo";

	public GetProductAndCatalogInfoCall() {
		super(EnvSetup.getSystemUrl("sellerproduct_iapi"),opurl,"POST","JSON");
	}
	
	public void addDefHeader() {
		client.addHeader("Content-Type", "application/json");
	}

	
	public JSONObject callAndGetReturnData(int sellerId,String productId){
		Map<String, Object> updateMap = new HashMap<String,Object>();
		updateMap.put("UserID", sellerId);
		updateMap.put("ProductID", productId);
		return callAndGetReturnData(updateMap);
	}
	
	
	public static void main(String[] args) {
		GetProductAndCatalogInfoCall aCall = new GetProductAndCatalogInfoCall();
		aCall.callAndGetReturnData();
	}

	
	@Override
	public JSONObject callAndReturn(Map<String, Object> paramMap) {
		return this.callAndGetReturnData(paramMap);
	}

	@Override
	public String getApiName() {
		return "GetProductAndCatalogInfo";
	}

}